/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.domain.bo;

import com.comac.ins.common.core.validate.AddGroup;
import com.comac.ins.common.core.validate.EditGroup;
import com.comac.ins.common.mybatis.core.domain.BaseEntity;
import com.comac.ins.isfd.domain.IsfdDatasourceTemplate;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据源数据模版业务对象 isfd_datasource_template
 *
 * @author Lion Li
 * @date 2024-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IsfdDatasourceTemplate.class, reverseConvertGenerate = false)
public class IsfdDatasourceTemplateBo extends BaseEntity {

    /**
     * 主键
     */
//    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 模版名称
     */
    @NotBlank(message = "模版名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String templateName;

    /**
     * 要素库类型
     */
    @NotBlank(message = "要素库类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private String databaseType;

    /**
     * 业务场景定义id
     */
    @NotNull(message = "业务场景定义id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long businessId;

    /**
     * 业务场景
     */
    @NotBlank(message = "业务场景不能为空", groups = {AddGroup.class, EditGroup.class})
    private String businessSceneName;

    /**
     * 字段信息，存储字段名称、所属表名、字段类型等（以JSON格式）
     */
    @NotBlank(message = "字段信息，存储字段名称、所属表名、字段类型等（以JSON格式）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String mapFields;

    /**
     * URL
     */
//    @NotBlank(message = "URL不能为空", groups = {AddGroup.class, EditGroup.class})
    private String url;

    /**
     * 是否删除，0-未删除，1-已删除
     */
//    @NotNull(message = "是否删除，0-未删除，1-已删除不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer isDeleted;

    /**
     * 状态
     */
//    @NotNull(message = "状态不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer status;


}
